'use strict';

const Controller = require('egg').Controller;


class ProductController extends Controller {
	async list(){
		const ctx = this.ctx;
		
		let param = Object.assign({
			key:'',
			pageNum: 1,
			pageSize:10,
			type:1,
		}, ctx.request.body);

		let list = await ctx.service.product.list(param);
		ctx.body = {
			code:'SUCCESS',
			data: list
		};
	}
}

module.exports = ProductController;